#include <stdio.h>
// 定义一个int类型的数组,存储7个数据,求和,,求平均值,
int main()
{
  int arr[7] = {1, 2, 3, 4, 5, 6, 7};
  int sum = 0;
  double avr = 0;
  for (int i = 0; i < 7; i++)
  {
    sum += arr[i];
  }
  avr = (double)sum / 7;
  printf("和为：%d\n", sum);
  printf("平均值为：%.2lf\n", avr);
  return 0;
}